import Vue from 'vue'
import VueRouter from 'vue-router'





Vue.use(VueRouter)

  const routes = [
    {
      // path:'/login',
      path:'/',
      component:()=>import("../views/login/login.vue"),
    },

    {
      path:'/register',

      component:()=>import("../views/login/register.vue"),
    },
    {
      path:'/index',

      component:()=>import("../views/shop/index.vue"),
    },
,
   //商品后台的路由
    {
      path:'/main',
      component:()=>import("../views/main.vue"),
      children:[
       //订单管理
        {
          path:'/order',
          name :'order',
          component :()=>import("../views/market/order.vue")
        },

        {
          //首页
          path:'/logistics',
          name :'logistics',
          component :()=>import("../views/track/logistics")
        },
        {
          //首页
          path:'/',
          name :'home',
          component :()=>import("../views/home/home")
        },
        {
          //人工客服
          path:'/kefu',
          name :'kefu',
          component :()=>import("../views/Mine/kefu")
        },
        {
          path:'/marketInfo',
          name :'marketInfo',
          component :()=>import("../views/market/marketInfo")
        },
        {
          path:'/user',
          name :'user',
          component :()=>import("../views/UserManage/UserManage"),

        },
        {
          path:'/set',
          name:'set',
          component :()=>import("../views/Mine/mine"),

        },
      ],

    }
]

const router = new VueRouter({
  routes
})

export default router
